package homework;

public class Homework12 {
	public static void main(String[] args) {
		int egg = 0;
		
		while (true) {
			
			if (egg % 2 == 1 && egg % 3 == 2 && egg % 4 == 3 && egg % 5 == 4) {
				System.out.println(egg);
				break;
			}
			
			egg++;
		}
	}
}
